package com.singzi.javaSenior.stream;

import org.junit.Test;

import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

public class Test01 {
    public int  getValue(){
        return 0;

    }
    @Test
    public void test01(){
        String[] plants = {"123214", "2342332","24234324", "2342332","24234324", "2342332","24234324", "2342332","24234324"};
        List<String> list = Arrays.asList(plants);
        long cont = list.stream().filter(p -> p.length() > 5).count();
        long cont1 = list.parallelStream().filter(p -> p.length() > 5).filter(p->p.charAt(0) == '2').count();
        System.out.println(cont);
        System.out.println(cont1);

    }
}
